package com.max.xihu.patterns.responsible;

/**
 * @Author: Max
 * @Date: 2020-09-15 23:46
 * @Description:
 */
public class RespClient {

    public static void main(String[] args) {
        Handler handler1 = new ConcreteHandler1();
        Handler handler2 = new ConcreteHandler2();
        Handler handler3 = new ConcreteHandler3();

        //设置处理顺序
        handler1.setNext(handler2);
        handler2.setNext(handler3);

        Response result = handler1.process(new RequstContext());

    }
}
